package com.wmyg.scanninggun.dao;

import com.wmyg.scanninggun.bean.DataPre;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DataPreMapper {

    @Insert({"insert into prepare_data(qrcode, batch) value(#{qrCode},#{batch})"})
    int insert(DataPre dataPre);

    @Select({"select count(*) from prepare_data where qrcode=#{qrCode}"})
    int select(String qrCode);

    int insertBatch(List<DataPre> dataPres);

}
